{"ast":null,"code":"import apiClient from \"../http\";\nimport { acceptContact, addContact, getContacts } from \"../routes\";\nexport default class ContactService {\n  static async getContacts() {\n    return apiClient.get(getContacts());\n  }\n  static async addContact(otherUserId) {\n    return apiClient.get(addContact(otherUserId));\n  }\n  static async acceptContact(contactId) {\n    return apiClient.put(acceptContact(contactId));\n  }\n  static async deleteContact(contactId) {\n    return apiClient.delete(acceptContact(contactId));\n  }\n}","map":{"version":3,"names":["apiClient","acceptContact","addContact","getContacts","ContactService","get","otherUserId","contactId","put","deleteContact","delete"],"sources":["/data/messenger.client/src/services/ContactService.ts"],"sourcesContent":["import apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {acceptContact, addContact, getContacts} from \"../routes\"\nimport {ContactListResponse} from \"../models/response/ContactListResponse\";\nimport {ContactListItem} from \"../models/response/ContactListItem\";\n\nexport default class ContactService {\n    public static async getContacts(): Promise<AxiosResponse<ContactListResponse>> {\n        return apiClient.get<ContactListResponse>(getContacts());\n    }\n\n    public static async addContact(otherUserId: string): Promise<AxiosResponse<ContactListItem>> {\n        return apiClient.get<ContactListItem>(addContact(otherUserId));\n    }\n\n    public static async acceptContact(contactId: string): Promise<AxiosResponse<ContactListItem>> {\n        return apiClient.put<ContactListItem>(acceptContact(contactId));\n    }\n\n    public static async deleteContact(contactId: string): Promise<AxiosResponse<ContactListItem>> {\n        return apiClient.delete<ContactListItem>(acceptContact(contactId));\n    }\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,SAAS;AAE/B,SAAQC,aAAa,EAAEC,UAAU,EAAEC,WAAW,QAAO,WAAW;AAIhE,eAAe,MAAMC,cAAc,CAAC;EAChC,aAAoBD,WAAW,GAAgD;IAC3E,OAAOH,SAAS,CAACK,GAAG,CAAsBF,WAAW,EAAE,CAAC;EAC5D;EAEA,aAAoBD,UAAU,CAACI,WAAmB,EAA2C;IACzF,OAAON,SAAS,CAACK,GAAG,CAAkBH,UAAU,CAACI,WAAW,CAAC,CAAC;EAClE;EAEA,aAAoBL,aAAa,CAACM,SAAiB,EAA2C;IAC1F,OAAOP,SAAS,CAACQ,GAAG,CAAkBP,aAAa,CAACM,SAAS,CAAC,CAAC;EACnE;EAEA,aAAoBE,aAAa,CAACF,SAAiB,EAA2C;IAC1F,OAAOP,SAAS,CAACU,MAAM,CAAkBT,aAAa,CAACM,SAAS,CAAC,CAAC;EACtE;AACJ"},"metadata":{},"sourceType":"module"}